home *** CD-ROM | disk | FTP | other *** search
/ BMUG Newsletter 1996 Spring / S96 NL CD.iso / New NL PD Collections / Sound Manager 3.1 / For Programmers / Interfaces / SoundComponents.a < prev    next >
Encoding:
Text File  |  1995-08-24  |  17.3 KB  |  648 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SoundComponents.a
  3. ;
  4. ;    Contains:    Sound Components Interfaces.
  5. ;
  6. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  7. ;                All rights reserved.
  8. ;
  9. ;    Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  10. ;
  11. ;
  12.  
  13.     IF &TYPE('__SOUNDCOMPONENTS__') = 'UNDEFINED' THEN
  14. __SOUNDCOMPONENTS__ SET 1
  15.  
  16.  
  17.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  18.     include 'Types.a'
  19.     ENDIF
  20. ;        include 'ConditionalMacros.a'                                ;
  21.  
  22.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  23.     include 'Components.a'
  24.     ENDIF
  25. ;        include 'MixedMode.a'                                        ;
  26.  
  27.     IF &TYPE('__SOUND__') = 'UNDEFINED' THEN
  28.     include 'Sound.a'
  29.     ENDIF
  30. ;
  31. ;                        * * *  N O T E  * * *
  32. ;
  33. ;    This file has been updated to include Sound Manager 3.1 interfaces.
  34. ;
  35. ;    Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  36. ;    that originally shipped with the PowerMacs. These missing functions and the
  37. ;    new 3.1 interfaces have been released in the SoundLib library for PowerPC
  38. ;    developers to link with. The runtime library for these functions are
  39. ;    installed by Sound Manager 3.1. The following functions are found in SoundLib.
  40. ;
  41. ;        AudioGetBass, AudioGetInfo, AudioGetMute, AudioGetOutputDevice,
  42. ;        AudioGetTreble, AudioGetVolume, AudioMuteOnEvent, AudioSetBass,
  43. ;        AudioSetMute, AudioSetToDefaults, AudioSetTreble, AudioSetVolume,
  44. ;        OpenMixerSoundComponent, CloseMixerSoundComponent, SoundComponentAddSource,
  45. ;        SoundComponentGetInfo, SoundComponentGetSource, SoundComponentGetSourceData,
  46. ;        SoundComponentInitOutputDevice, SoundComponentPauseSource,
  47. ;        SoundComponentPlaySourceBuffer, SoundComponentRemoveSource,
  48. ;        SoundComponentSetInfo, SoundComponentSetOutput, SoundComponentSetSource,
  49. ;        SoundComponentStartSource, SoundComponentStopSource
  50. ;
  51. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  52. ; constants
  53. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  54.  
  55. ;sound component set/get info selectors
  56. siVolume                        EQU        'volu'
  57. siHardwareVolume                EQU        'hvol'
  58. siSpeakerVolume                    EQU        'svol'
  59. siHeadphoneVolume                EQU        'pvol'
  60. siHardwareVolumeSteps            EQU        'hstp'
  61. siHeadphoneVolumeSteps            EQU        'hdst'
  62. siHardwareMute                    EQU        'hmut'
  63. siSpeakerMute                    EQU        'smut'
  64. siHeadphoneMute                    EQU        'pmut'
  65. siRateMultiplier                EQU        'rmul'
  66. siQuality                        EQU        'qual'
  67. ;format types
  68. kOffsetBinary                    EQU        'raw '
  69. kTwosComplement                    EQU        'twos'
  70. kMACE3Compression                EQU        'MAC3'
  71. kMACE6Compression                EQU        'MAC6'
  72.  
  73. ;quality flags
  74. ;use interpolation in rate conversion
  75. kBestQuality                    EQU        (1 << 0)
  76.  
  77. ;useful bit masks
  78. kInputMask                        EQU        $000000FF            ;masks off input bits
  79. kOutputMask                        EQU        $0000FF00            ;masks off output bits
  80. kOutputShift                    EQU        8                    ;amount output bits are shifted
  81. kActionMask                        EQU        $00FF0000            ;masks off action bits
  82. kSoundComponentBits                EQU        $00FFFFFF
  83.  
  84. ;SoundComponentPlaySourceBuffer action flags
  85. kSourcePaused                    EQU        (1 << 0)
  86. kPassThrough                    EQU        (1 << 16)
  87. kNoSoundComponentChain            EQU        (1 << 17)
  88. ;flags for OpenMixerSoundComponent
  89. kNoMixing                        EQU        (1 << 0)            ;don't mix source
  90. kNoSampleRateConversion            EQU        (1 << 1)            ;don't convert sample rate (i.e. 11 kHz -> 22 kHz)
  91. kNoSampleSizeConversion            EQU        (1 << 2)            ;don't convert sample size (i.e. 16 -> 8)
  92. kNoSampleFormatConversion        EQU        (1 << 3)            ;don't convert sample format (i.e. 'twos' -> 'raw ')
  93. kNoChannelConversion            EQU        (1 << 4)            ;don't convert stereo/mono
  94. kNoDecompression                EQU        (1 << 5)            ;don't decompress (i.e. 'MAC3' -> 'raw ')
  95. kNoVolumeConversion                EQU        (1 << 6)            ;don't apply volume
  96. kNoRealtimeProcessing            EQU        (1 << 7)            ;won't run at interrupt time
  97.  
  98. ;Audio Component constants
  99. ;Values for whichChannel parameter
  100. audioAllChannels                EQU        0                    ;All channels (usually interpreted as both left and right)
  101. audioLeftChannel                EQU        1                    ;Left channel
  102. audioRightChannel                EQU        2                    ;Right channel
  103. ;Values for mute parameter
  104. audioUnmuted                    EQU        0                    ;Device is unmuted
  105. audioMuted                        EQU        1                    ;Device is muted
  106. ;Capabilities flags definitions
  107. audioDoesMono                    EQU        (1 << 0)            ;Device supports mono output
  108. audioDoesStereo                    EQU        (1 << 1)            ;Device supports stereo output
  109. audioDoesIndependentChannels    EQU        (1 << 2)            ;Device supports independent software control of each channel
  110.  
  111. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  112. ; typedefs
  113. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  114. ;ShortFixed consists of an 8 bit, 2's complement integer part in the high byte,
  115. ;with an 8 bit fractional part in the low byte; its range is -128 to 127.99609375
  116. ; typedef short             ShortFixed
  117. ; typedef struct SoundComponentData  SoundComponentData
  118. ; typedef struct SoundComponentData  *SoundComponentDataPtr
  119. SoundComponentData         RECORD    0
  120. flags                     ds.l   1        ; offset: $0 (0)
  121. format                     ds.l   1        ; offset: $4 (4)
  122. numChannels                 ds.w   1        ; offset: $8 (8)
  123. sampleSize                 ds.w   1        ; offset: $A (10)
  124. sampleRate                 ds.l   1        ; offset: $C (12)
  125. sampleCount                 ds.l   1        ; offset: $10 (16)
  126. buffer                     ds.l   1        ; offset: $14 (20)
  127. reserved                 ds.l   1        ; offset: $18 (24)
  128. sizeof                     EQU *            ; size:   $1C (28)
  129.                         ENDR
  130.  
  131. ; typedef struct SoundParamBlock  SoundParamBlock
  132. ; typedef SoundParamBlock     *SoundParamBlockPtr
  133. SoundParamBlock         RECORD    0
  134. recordSize                 ds.l   1        ; offset: $0 (0)        ;size of this record in bytes
  135. desc                     ds     SoundComponentData ; offset: $4 (4) ;description of sound buffer
  136. rateMultiplier             ds.l   1        ; offset: $20 (32)        ;rate multiplier to apply to sound
  137. leftVolume                 ds.w   1        ; offset: $24 (36)        ;volumes to apply to sound
  138. rightVolume                 ds.w   1        ; offset: $26 (38)
  139. quality                     ds.l   1        ; offset: $28 (40)        ;quality to apply to sound
  140. filter                     ds.l   1        ; offset: $2C (44)        ;filter to apply to sound
  141. moreRtn                     ds.l   1        ; offset: $30 (48)        ;routine to call to get more data
  142. completionRtn             ds.l   1        ; offset: $34 (52)        ;routine to call when buffer is complete
  143. refCon                     ds.l   1        ; offset: $38 (56)        ;user refcon
  144. result                     ds.w   1        ; offset: $3C (60)        ;result
  145. sizeof                     EQU *            ; size:   $3E (62)
  146.                         ENDR
  147.  
  148. ; typedef void                 *SoundSource
  149. AudioInfo                 RECORD    0
  150. capabilitiesFlags         ds.l   1        ; offset: $0 (0)        ;Describes device capabilities
  151. reserved                 ds.l   1        ; offset: $4 (4)        ;Reserved by Apple
  152. numVolumeSteps             ds.w   1        ; offset: $8 (8)        ;Number of significant increments between min and max volume
  153. sizeof                     EQU *            ; size:   $A (10)
  154.                         ENDR
  155.  
  156. ; typedef struct AudioInfo     AudioInfo
  157. ; typedef AudioInfo         *AudioInfoPtr
  158. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  159. ; functions for sound components
  160. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  161. ;Sound Component dispatch selectors
  162.  
  163. ;these calls cannot be delegated
  164. kSoundComponentInitOutputDeviceSelect EQU        1
  165. kSoundComponentSetSourceSelect    EQU        2
  166. kSoundComponentGetSourceSelect    EQU        3
  167. kSoundComponentGetSourceDataSelect EQU        4
  168. kSoundComponentSetOutputSelect    EQU        5
  169. kDelegatedSoundComponentSelectors EQU        $0100                ;first selector that can be delegated up the chain
  170. ;these calls can be delegated and have own range
  171. kSoundComponentAddSourceSelect    EQU        kDelegatedSoundComponentSelectors + 1
  172. kSoundComponentRemoveSourceSelect EQU        kDelegatedSoundComponentSelectors + 2
  173. kSoundComponentGetInfoSelect    EQU        kDelegatedSoundComponentSelectors + 3
  174. kSoundComponentSetInfoSelect    EQU        kDelegatedSoundComponentSelectors + 4
  175. kSoundComponentStartSourceSelect EQU        kDelegatedSoundComponentSelectors + 5
  176. kSoundComponentStopSourceSelect    EQU        kDelegatedSoundComponentSelectors + 6
  177. kSoundComponentPauseSourceSelect EQU        kDelegatedSoundComponentSelectors + 7
  178. kSoundComponentPlaySourceBufferSelect EQU        kDelegatedSoundComponentSelectors + 8
  179.  
  180. ;Audio Component selectors
  181. kAudioGetVolumeSelect            EQU        0
  182. kAudioSetVolumeSelect            EQU        1
  183. kAudioGetMuteSelect                EQU        2
  184. kAudioSetMuteSelect                EQU        3
  185. kAudioSetToDefaultsSelect        EQU        4
  186. kAudioGetInfoSelect                EQU        5
  187. kAudioGetBassSelect                EQU        6
  188. kAudioSetBassSelect                EQU        7
  189. kAudioGetTrebleSelect            EQU        8
  190. kAudioSetTrebleSelect            EQU        9
  191. kAudioGetOutputDeviceSelect        EQU        10
  192. kAudioMuteOnEventSelect            EQU        129
  193.  
  194. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  195. ; Sound Manager 3.0 utilities
  196. ;
  197. ; pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  198. ;
  199.     IF ¬ GENERATINGCFM THEN
  200.         Macro
  201.         _OpenMixerSoundComponent
  202.             dc.w     $203C
  203.             dc.w     $0614
  204.             dc.w     $0018
  205.             dc.w     $A800
  206.         EndM
  207.     ELSE
  208.         IMPORT_CFM_FUNCTION    OpenMixerSoundComponent
  209.     ENDIF
  210.  
  211. ;
  212. ; pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  213. ;
  214.     IF ¬ GENERATINGCFM THEN
  215.         Macro
  216.         _CloseMixerSoundComponent
  217.             dc.w     $203C
  218.             dc.w     $0218
  219.             dc.w     $0018
  220.             dc.w     $A800
  221.         EndM
  222.     ELSE
  223.         IMPORT_CFM_FUNCTION    CloseMixerSoundComponent
  224.     ENDIF
  225.  
  226. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  227. ; basic sound component functions
  228. ;
  229. ; pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  230. ;
  231.     IF ¬ GENERATINGCFM THEN
  232.         Macro
  233.         _SoundComponentInitOutputDevice
  234.             dc.w     $2F3C
  235.             dc.w     $0004
  236.             dc.w     $0001
  237.             moveq    #0,d0
  238.             dc.w     $A82A
  239.         EndM
  240.     ELSE
  241.         IMPORT_CFM_FUNCTION    SoundComponentInitOutputDevice
  242.     ENDIF
  243.  
  244. ;
  245. ; pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  246. ;
  247.     IF ¬ GENERATINGCFM THEN
  248.         Macro
  249.         _SoundComponentSetSource
  250.             dc.w     $2F3C
  251.             dc.w     $0008
  252.             dc.w     $0002
  253.             moveq    #0,d0
  254.             dc.w     $A82A
  255.         EndM
  256.     ELSE
  257.         IMPORT_CFM_FUNCTION    SoundComponentSetSource
  258.     ENDIF
  259.  
  260. ;
  261. ; pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  262. ;
  263.     IF ¬ GENERATINGCFM THEN
  264.         Macro
  265.         _SoundComponentGetSource
  266.             dc.w     $2F3C
  267.             dc.w     $0008
  268.             dc.w     $0003
  269.             moveq    #0,d0
  270.             dc.w     $A82A
  271.         EndM
  272.     ELSE
  273.         IMPORT_CFM_FUNCTION    SoundComponentGetSource
  274.     ENDIF
  275.  
  276. ;
  277. ; pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  278. ;
  279.     IF ¬ GENERATINGCFM THEN
  280.         Macro
  281.         _SoundComponentGetSourceData
  282.             dc.w     $2F3C
  283.             dc.w     $0004
  284.             dc.w     $0004
  285.             moveq    #0,d0
  286.             dc.w     $A82A
  287.         EndM
  288.     ELSE
  289.         IMPORT_CFM_FUNCTION    SoundComponentGetSourceData
  290.     ENDIF
  291.  
  292. ;
  293. ; pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  294. ;
  295.     IF ¬ GENERATINGCFM THEN
  296.         Macro
  297.         _SoundComponentSetOutput
  298.             dc.w     $2F3C
  299.             dc.w     $0008
  300.             dc.w     $0005
  301.             moveq    #0,d0
  302.             dc.w     $A82A
  303.         EndM
  304.     ELSE
  305.         IMPORT_CFM_FUNCTION    SoundComponentSetOutput
  306.     ENDIF
  307.  
  308. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  309. ; junction methods for the mixer, must be called at non-interrupt level
  310. ;
  311. ; pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  312. ;
  313.     IF ¬ GENERATINGCFM THEN
  314.         Macro
  315.         _SoundComponentAddSource
  316.             dc.w     $2F3C
  317.             dc.w     $0004
  318.             dc.w     $0101
  319.             moveq    #0,d0
  320.             dc.w     $A82A
  321.         EndM
  322.     ELSE
  323.         IMPORT_CFM_FUNCTION    SoundComponentAddSource
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  328. ;
  329.     IF ¬ GENERATINGCFM THEN
  330.         Macro
  331.         _SoundComponentRemoveSource
  332.             dc.w     $2F3C
  333.             dc.w     $0004
  334.             dc.w     $0102
  335.             moveq    #0,d0
  336.             dc.w     $A82A
  337.         EndM
  338.     ELSE
  339.         IMPORT_CFM_FUNCTION    SoundComponentRemoveSource
  340.     ENDIF
  341.  
  342. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  343. ; info methods
  344. ;
  345. ; pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  346. ;
  347.     IF ¬ GENERATINGCFM THEN
  348.         Macro
  349.         _SoundComponentGetInfo
  350.             dc.w     $2F3C
  351.             dc.w     $000C
  352.             dc.w     $0103
  353.             moveq    #0,d0
  354.             dc.w     $A82A
  355.         EndM
  356.     ELSE
  357.         IMPORT_CFM_FUNCTION    SoundComponentGetInfo
  358.     ENDIF
  359.  
  360. ;
  361. ; pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  362. ;
  363.     IF ¬ GENERATINGCFM THEN
  364.         Macro
  365.         _SoundComponentSetInfo
  366.             dc.w     $2F3C
  367.             dc.w     $000C
  368.             dc.w     $0104
  369.             moveq    #0,d0
  370.             dc.w     $A82A
  371.         EndM
  372.     ELSE
  373.         IMPORT_CFM_FUNCTION    SoundComponentSetInfo
  374.     ENDIF
  375.  
  376. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  377. ; control methods
  378. ;
  379. ; pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  380. ;
  381.     IF ¬ GENERATINGCFM THEN
  382.         Macro
  383.         _SoundComponentStartSource
  384.             dc.w     $2F3C
  385.             dc.w     $0006
  386.             dc.w     $0105
  387.             moveq    #0,d0
  388.             dc.w     $A82A
  389.         EndM
  390.     ELSE
  391.         IMPORT_CFM_FUNCTION    SoundComponentStartSource
  392.     ENDIF
  393.  
  394. ;
  395. ; pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  396. ;
  397.     IF ¬ GENERATINGCFM THEN
  398.         Macro
  399.         _SoundComponentStopSource
  400.             dc.w     $2F3C
  401.             dc.w     $0006
  402.             dc.w     $0106
  403.             moveq    #0,d0
  404.             dc.w     $A82A
  405.         EndM
  406.     ELSE
  407.         IMPORT_CFM_FUNCTION    SoundComponentStopSource
  408.     ENDIF
  409.  
  410. ;
  411. ; pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  412. ;
  413.     IF ¬ GENERATINGCFM THEN
  414.         Macro
  415.         _SoundComponentPauseSource
  416.             dc.w     $2F3C
  417.             dc.w     $0006
  418.             dc.w     $0107
  419.             moveq    #0,d0
  420.             dc.w     $A82A
  421.         EndM
  422.     ELSE
  423.         IMPORT_CFM_FUNCTION    SoundComponentPauseSource
  424.     ENDIF
  425.  
  426. ;
  427. ; pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  428. ;
  429.     IF ¬ GENERATINGCFM THEN
  430.         Macro
  431.         _SoundComponentPlaySourceBuffer
  432.             dc.w     $2F3C
  433.             dc.w     $000C
  434.             dc.w     $0108
  435.             moveq    #0,d0
  436.             dc.w     $A82A
  437.         EndM
  438.     ELSE
  439.         IMPORT_CFM_FUNCTION    SoundComponentPlaySourceBuffer
  440.     ENDIF
  441.  
  442. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  443. ; interface for Audio Components
  444. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  445. ;Volume is described as a value between 0 and 1, with 0 indicating minimum
  446. ;  volume and 1 indicating maximum volume; if the device doesn't support
  447. ;  software control of volume, then a value of unimpErr is returned, indicating
  448. ;  that these functions are not supported by the device
  449. ;
  450. ; pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  451. ;
  452.     IF ¬ GENERATINGCFM THEN
  453.         Macro
  454.         _AudioGetVolume
  455.             dc.w     $2F3C
  456.             dc.w     $0006
  457.             dc.w     $0000
  458.             moveq    #0,d0
  459.             dc.w     $A82A
  460.         EndM
  461.     ELSE
  462.         IMPORT_CFM_FUNCTION    AudioGetVolume
  463.     ENDIF
  464.  
  465. ;
  466. ; pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  467. ;
  468.     IF ¬ GENERATINGCFM THEN
  469.         Macro
  470.         _AudioSetVolume
  471.             dc.w     $2F3C
  472.             dc.w     $0004
  473.             dc.w     $0001
  474.             moveq    #0,d0
  475.             dc.w     $A82A
  476.         EndM
  477.     ELSE
  478.         IMPORT_CFM_FUNCTION    AudioSetVolume
  479.     ENDIF
  480.  
  481. ;If the device doesn't support software control of mute, then a value of unimpErr is
  482. ;returned, indicating that these functions are not supported by the device
  483. ;
  484. ; pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  485. ;
  486.     IF ¬ GENERATINGCFM THEN
  487.         Macro
  488.         _AudioGetMute
  489.             dc.w     $2F3C
  490.             dc.w     $0006
  491.             dc.w     $0002
  492.             moveq    #0,d0
  493.             dc.w     $A82A
  494.         EndM
  495.     ELSE
  496.         IMPORT_CFM_FUNCTION    AudioGetMute
  497.     ENDIF
  498.  
  499. ;
  500. ; pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  501. ;
  502.     IF ¬ GENERATINGCFM THEN
  503.         Macro
  504.         _AudioSetMute
  505.             dc.w     $2F3C
  506.             dc.w     $0004
  507.             dc.w     $0003
  508.             moveq    #0,d0
  509.             dc.w     $A82A
  510.         EndM
  511.     ELSE
  512.         IMPORT_CFM_FUNCTION    AudioSetMute
  513.     ENDIF
  514.  
  515. ;AudioSetToDefaults causes the associated device to reset its volume and mute values
  516. ;(and perhaps other characteristics, e.g. attenuation) to "factory default" settings
  517. ;
  518. ; pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  519. ;
  520.     IF ¬ GENERATINGCFM THEN
  521.         Macro
  522.         _AudioSetToDefaults
  523.             dc.w     $2F3C
  524.             dc.w     $0000
  525.             dc.w     $0004
  526.             moveq    #0,d0
  527.             dc.w     $A82A
  528.         EndM
  529.     ELSE
  530.         IMPORT_CFM_FUNCTION    AudioSetToDefaults
  531.     ENDIF
  532.  
  533. ;This routine is required; it must be implemented by all audio components
  534. ;
  535. ; pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  536. ;
  537.     IF ¬ GENERATINGCFM THEN
  538.         Macro
  539.         _AudioGetInfo
  540.             dc.w     $2F3C
  541.             dc.w     $0004
  542.             dc.w     $0005
  543.             moveq    #0,d0
  544.             dc.w     $A82A
  545.         EndM
  546.     ELSE
  547.         IMPORT_CFM_FUNCTION    AudioGetInfo
  548.     ENDIF
  549.  
  550. ;
  551. ; pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  552. ;
  553.     IF ¬ GENERATINGCFM THEN
  554.         Macro
  555.         _AudioGetBass
  556.             dc.w     $2F3C
  557.             dc.w     $0006
  558.             dc.w     $0006
  559.             moveq    #0,d0
  560.             dc.w     $A82A
  561.         EndM
  562.     ELSE
  563.         IMPORT_CFM_FUNCTION    AudioGetBass
  564.     ENDIF
  565.  
  566. ;
  567. ; pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  568. ;
  569.     IF ¬ GENERATINGCFM THEN
  570.         Macro
  571.         _AudioSetBass
  572.             dc.w     $2F3C
  573.             dc.w     $0004
  574.             dc.w     $0007
  575.             moveq    #0,d0
  576.             dc.w     $A82A
  577.         EndM
  578.     ELSE
  579.         IMPORT_CFM_FUNCTION    AudioSetBass
  580.     ENDIF
  581.  
  582. ;
  583. ; pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  584. ;
  585.     IF ¬ GENERATINGCFM THEN
  586.         Macro
  587.         _AudioGetTreble
  588.             dc.w     $2F3C
  589.             dc.w     $0006
  590.             dc.w     $0008
  591.             moveq    #0,d0
  592.             dc.w     $A82A
  593.         EndM
  594.     ELSE
  595.         IMPORT_CFM_FUNCTION    AudioGetTreble
  596.     ENDIF
  597.  
  598. ;
  599. ; pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  600. ;
  601.     IF ¬ GENERATINGCFM THEN
  602.         Macro
  603.         _AudioSetTreble
  604.             dc.w     $2F3C
  605.             dc.w     $0004
  606.             dc.w     $0009
  607.             moveq    #0,d0
  608.             dc.w     $A82A
  609.         EndM
  610.     ELSE
  611.         IMPORT_CFM_FUNCTION    AudioSetTreble
  612.     ENDIF
  613.  
  614. ;
  615. ; pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  616. ;
  617.     IF ¬ GENERATINGCFM THEN
  618.         Macro
  619.         _AudioGetOutputDevice
  620.             dc.w     $2F3C
  621.             dc.w     $0004
  622.             dc.w     $000A
  623.             moveq    #0,d0
  624.             dc.w     $A82A
  625.         EndM
  626.     ELSE
  627.         IMPORT_CFM_FUNCTION    AudioGetOutputDevice
  628.     ENDIF
  629.  
  630. ;This is routine is private to the AudioVision component.  It enables the watching of the mute key.
  631. ;
  632. ; pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  633. ;
  634.     IF ¬ GENERATINGCFM THEN
  635.         Macro
  636.         _AudioMuteOnEvent
  637.             dc.w     $2F3C
  638.             dc.w     $0002
  639.             dc.w     $0081
  640.             moveq    #0,d0
  641.             dc.w     $A82A
  642.         EndM
  643.     ELSE
  644.         IMPORT_CFM_FUNCTION    AudioMuteOnEvent
  645.     ENDIF
  646.  
  647.     ENDIF ; __SOUNDCOMPONENTS__
  648.